/*!
\copyright  Copyright (c) 2019 - 2021 Qualcomm Technologies International, Ltd.\n
            All Rights Reserved.\n
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief	    Headset Tones UI Indicator configuration table
*/

#include "headset_tones_config_table.h"

#include "headset_tones.h"

#include "headset_buttons.h"

#include <domain_message.h>
#include <ui_inputs.h>
#include <ui_indicator_tones.h>

#include <av.h>
#include <gaming_mode.h>
#include <pairing.h>
#include <telephony_messages.h>
#include <handset_service_protected.h>
#include <power_manager.h>
#include <volume_service.h>
#include <system_state.h>
#ifdef INCLUDE_AMA
#include <voice_ui_message_ids.h>
#endif


const ui_event_indicator_table_t headset_ui_tones_table[] =
{
    {.sys_event=PAIRING_ACTIVE,                                { .tone.tone = app_tone_pairing, /*0x00*/
                                                                 .tone.queueable = FALSE,
                                                                 .tone.interruptible = FALSE }},
    {.sys_event=VOLUME_SERVICE_MIN_VOLUME,                     { .tone.tone = app_tone_volume_limit,/*0x01*/
                                                                 .tone.queueable = FALSE,
                                                                 .tone.interruptible = FALSE }},
    {.sys_event=VOLUME_SERVICE_MAX_VOLUME,                     { .tone.tone = app_tone_volume_limit,/*0x02*/
                                                                 .tone.queueable = FALSE,
                                                                 .tone.interruptible = FALSE }},
    {.sys_event=APP_BUTTON_PAIR,                               { .tone.tone = app_tone_button,/*0x03*/
                                                                 .tone.queueable = TRUE,
                                                                 .tone.interruptible = FALSE }},
    {.sys_event=APP_FACTORY_RESET,                             { .tone.tone = app_tone_pairing_deleted,/*0x04*/
                                                                 .tone.queueable = TRUE,
                                                                 .tone.interruptible = FALSE }},
#ifdef EXCLUDE_CONN_PROMPTS
    {.sys_event=HANDSET_SERVICE_FIRST_PROFILE_CONNECTED_IND,   { .tone.tone = app_tone_av_connected,/*0x05*/
                                                                  .tone.queueable = TRUE,
                                                                  .tone.interruptible = FALSE }},    
    {.sys_event=ui_input_device_disconnect_tone,               { .tone.tone = app_tone_av_disconnected,/*0x06*/
                                                                  .tone.queueable = TRUE,
                                                                  .tone.interruptible = FALSE }},
#endif
    {.sys_event=GAMING_MODE_ON,                                { .tone.tone = app_tone_gaming_mode_on,
                                                                 .tone.queueable = TRUE,
                                                                 .tone.interruptible = FALSE }},
    {.sys_event=GAMING_MODE_OFF,                               { .tone.tone = app_tone_gaming_mode_off,
                                                                 .tone.queueable = TRUE,
                                                                 .tone.interruptible = FALSE }},
    {.sys_event=APP_POWER_LOW,                                 { .tone.tone = app_tone_battery_empty,/*0x07*/
                                                                 .tone.queueable = FALSE,
                                                                 .tone.interruptible = FALSE }},
    {.sys_event=POWER_ON,                                      { .tone.tone = app_tone_power_on,/*0x08*/
                                                                  .tone.queueable = TRUE,
                                                                  .tone.interruptible = FALSE,
                                                                  .tone.button_feedback = TRUE }},
    {.sys_event=ui_input_sm_power_off,                         { .tone.tone = app_tone_power_off,/*0x09*/
                                                                 .tone.queueable = TRUE,
                                                                 .tone.interruptible = FALSE },
                                                                 .await_indication_completion = TRUE}
};

const ui_repeating_indication_table_t headset_ui_repeating_tones_table[] =
{
    {.triggering_sys_event = TELEPHONY_MUTE_ACTIVE,              .reminder_period = 15,
                                                                 .cancelling_sys_event = TELEPHONY_MUTE_INACTIVE,
                                                               { .tone.tone = app_tone_hfp_mute_reminder,
                                                                 .tone.queueable = TRUE,
                                                                 .tone.interruptible = FALSE }}
};

uint8 HeadsetTonesConfigTable_SingleGetSize(void)
{
#if INCLUDE_TONES
    return ARRAY_DIM(headset_ui_tones_table);
#else
    return 0;
#endif
}

uint8 HeadsetTonesConfigTable_RepeatingGetSize(void)
{
#if INCLUDE_TONES
    return ARRAY_DIM(headset_ui_repeating_tones_table);
#else
    return 0;
#endif
}

